/**
 * @(#)RandomKeyGenerator.java Jan 22, 2010
 *   
 * Copyright  (c) 2009-2010 Wilmar IT Service,  Inc.   
 * All  rights  reserved.   
 * TODO
 */

package test.service.process;

import java.util.Map;
import java.util.Random;

import com.wilmar.process.core.services.spi.IProcessInstanceKeyGenerator;
import com.wilmar.process.entity.User;

/**
 * @author MaKuBEX Email:makubexnet@gmail.com
 * @version 1.0.0
 */
public class RandomKeyGenerator implements IProcessInstanceKeyGenerator {

	/**
	 * @serialField
	 */
	private static final long serialVersionUID = -118927883989504899L;

	/**
	 * @see com.wilmar.process.core.services.spi.IProcessInstanceKeyGenerator#generateProcessInstanceKey(java.util.Map,
	 *      com.wilmar.process.entity.User)
	 */
	public String generateProcessInstanceKey(
			Map<String, String[]> parameterMap, User instanceStarter) {
		Random r = new Random();
		Long l = r.nextLong();
		String s = l.toString();
		return s;
	}

}
